import request from './requests.js'
import qs from 'qs'
import Cookies from 'js-cookie'
import {
	move_sku_location_url
} from "./setting.js"

import {
	Toast
} from 'vant'

import {
	getLocalTime
} from "./date.js"





function move_sku_location(from_location_id, to_location_id, sku_id, value, callBack) {


		request({
			method: 'post',
			url: move_sku_location_url,
			data: qs.stringify({ //这里是发送给后台的数据

				from_location_id: from_location_id, 
				to_location_id: to_location_id, 
				sku_id: sku_id, 
				value: value
			})
		}).then((response) => { //这里使用了ES6的语法
			// console.log(response)
			let sku_list = response.data.resultBody

			callBack(sku_list)
		}).catch((error) => {
			console.log(error)
			Toast('远程接口故障请联系管理员！！')
	

		})


}





export default move_sku_location
